package com.xce.order.config;

import feign.Logger;
import feign.Retryer;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @ClassName OrderConfig
 * @Description order配置类
 * @Author lld
 * @Date 2025/6/25 13:28
 * @Version 1.0
 */
@Configuration
public class OrderConfig {


    //注解方式实现远程调用
    @LoadBalanced
    @Bean
    public RestTemplate redisTemplate() {
        return new RestTemplate();
    }

    @Bean
    public Logger.Level feignLogger() {
        // 全量日志
        return Logger.Level.FULL;
    }
    // @Bean
    public Retryer retryer() {
        return new Retryer.Default(100, 1, 3);
    }
}
